"""
读取配置文件
"""
import configparser

def get_config():
    config = configparser.ConfigParser()
    config.read('config.ini')
    return  config['stock']['codes']

    # print('testD' in config)
    # print(config.sections())
    # print(config['mysql']['port'])

    # for key in config['stock']:
    #     print(config['stock'][key])

if __name__ == '__main__':
    codes = get_config()
    assert codes, "请输入股票代码"